//导入request.js请求工具
import request from '@/utils/request.js'

export const sendCommentService = (data) => {
  return request({
    url: '/comments/sendComments',
    method: 'post',
    data
  })
}

export const getCommentService = (goodsId,userId) =>{
    return request({
        url: '/comments/getComments',
        method: 'get',
        params:{
            goodsId,
            userId
        }
    })
}

export const deleteCommentService = (id) =>{
    return request({
        url: '/comments',
        method: 'delete',
        params:{
            id
        }
    })
}